import { getUserDepID, getCompanyID, getUserID } from '@/utils';

/** 物资管理Manage数据范围权限判断 */
export const MaterialAndAssetManageTab = (curRes: Record<string, any>) => {
  if (curRes?.['/assetMaterial/assetCompanyID']) {
    return {
      assetCompanyID: getCompanyID(),
      params: 'assetCompanyID',
    };
  } else if (curRes?.['/assetMaterial/assetDepartmentID']) {
    return {
      assetDepartmentID: getUserDepID(),
      params: 'assetDepartmentID',
    };
  } else if (curRes?.['/assetMaterial/asseterID']) {
    return {
      asseterID: getUserID(),
      params: 'asseterID',
    };
  } else {
    return {};
  }
};

// if (curRes?.['/assetMaterial/createCompanyID']) {
//   return {
//     createCompanyID: getCompanyID(),
//     params: 'createCompanyID',
//   };
// } else if (curRes?.['/assetMaterial/createDepartmentID']) {
//   return {
//     createDepartmentID: getUserDepID(),
//     params: 'createDepartmentID',
//   };
// } else if (curRes?.['/assetMaterial/createrID']) {
//   return {
//     createrID: getUserID(),
//     params: 'createrID',
//   };
// } else {
//   return {};
// }
